package com.nulldev.util.web.nTube;

import com.nulldev.util.VariableAPI.ArrayUtils;

public enum NTubeOperationMode {

	/**
	 * Standard nTube with the full "nTube2" interface/frontend.
	 */
	DEFAULT("full", "Default"),
	/**
	 * nTube with only the embed page and dependencies.
	 */
	EMBED_ONLY("embed"),
	/**
	 * nTube with only the Invidious compatible API.
	 */
	INVIDIOUS_COMPAT_ONLY("invidious");

	private final String[] args;

	private NTubeOperationMode(final String... args) {
		this.args = args;
	}

	public static NTubeOperationMode getFromString(final String val) {
		for (final NTubeOperationMode opMode : values()) {
			if (ArrayUtils.StringArrayUtils.containsString(opMode.args, val))
				return opMode;
		}
		return DEFAULT;
	}
}
